before that mess:
803CA490	initially constructs the superscript and postscript messages
...
LW	A0,0138 (SP)	;A0=str
ADDIU	A1,R0,0006	;A1=strlen	this will need to be changed later!
JAL	8009C1C0
ADDIU	A2,R0,0020	;A2=character to remove from end of string
//803CA5A8:	1558	write stuff in superscript after the name
ADDIU	A0,S0,0032	;A0=p->superscript
LUI	A1,803D
SW	V0,0050 (SP)
ADDIU	A1,A1,AD78	;A1=803CAD78: string 'To '
SW	A0,002C (SP)	;save p->superscript
JAL	800998C0
ADDIU	A2,R0,0003	;A2=strlen
//803CA5C4:	1574	write name to postscript
ADDIU	A0,S0,009C	;A0=S0+9C	postscript start pos
LUI	A1,8013
LW	A1,6FD8 (A1)	;A1=80136FD8: p->player's name
SW	A0,0028 (SP)
JAL	800998C0
LW	A2,0050 (SP)	;A2=strlen of name
//803CA5DC:	158C	write stuff in postscript following name
LW	T6,0050 (SP)	;T6=strlen of name
LUI	A1,803D
ADDIU	A1,A1,AD7C	;A1=803CAD7C: p->postscript 'From '
ADDU	A0,S0,T6	;A0=S0+strlen
ADDIU	A0,A0,009C	;A0+=9C	postscript start pos + strlen
JAL	800998C0
ADDIU	A2,R0,0002	;A2=strlen
BEQ	R0,R0,803CA6B4
SB	R0,002F (S0)
//803CA600:

8009C1C0:	removes trailing characters from string
	accepts: A0=p->string, A1=strlen, A2=search character
	returns: V0=new strlen (copied from A1)
	fries: V0,V1,A0,A1,A3,T0,T6,T7,T8,T9	;reduces A2 to 1 byte
	SW	A2,0008 (SP)
	ANDI	A2,A2,00FF
	ADDU	A0,A0,A1
	BEQ	A1,R0,8009C278
	ADDIU	A0,A0,FFFF
	ANDI	A3,A1,0003
	SUBU	A3,R0,A3
	BEQ	A3,R0,8009C20C
	ADDU	V1,A3,A1
	OR	V0,A2,R0
	//8009C1E8:
	LBU	T6,0000 (A0)
	BEQL	V0,T6,8009C200
	ADDIU	A1,A1,FFFF
	JR	RA
	OR	V0,A1,R0
	-ADDIU	A1,A1,FFFF
	//8009C200:
	BNE	V1,A1,8009C1E8
	ADDIU	A0,A0,FFFF
	BEQ	A1,R0,8009C278
	//8009C20C:
	OR	V0,A2,R0
	//8009C210:
	LBU	T7,0000 (A0)
	BEQL	V0,T7,8009C228
	LBU	T8,FFFF (A0)
	JR	RA
	OR	V0,A1,R0
	-LBU	T8,FFFF (A0)
	//8009C228:
	ADDIU	A0,A0,FFFF
	BEQL	V0,T8,8009C240
	LBU	T9,FFFF (A0)
	JR	RA
	ADDIU	V0,A1,FFFF
	-LBU	T9,FFFF (A0)
	//8009C240:
	ADDIU	A0,A0,FFFF
	BEQL	V0,T9,8009C258
	LBU	T0,FFFF (A0)
	JR	RA
	ADDIU	V0,A1,FFFE
	-LBU	T0,FFFF (A0)
	//8009C258:
	ADDIU	A0,A0,FFFF
	BEQL	V0,T0,8009C270
	ADDIU	A1,A1,FFFC
	JR	RA
	ADDIU	V0,A1,FFFD
	-ADDIU	A1,A1,FFFC
	//8009C270:
	BNEZ	A1,8009C210
	ADDIU	A0,A0,FFFF
	//8009C278:
	OR	V0,R0,R0
	JR	RA
	NOP

REWRITE:
//803CA5A8:	1558	write stuff in superscript after the name
	ADDIU	A0,S0,0032	;A0=p->superscript
	LUI	A1,803D
	SW	V0,0050 (SP)
	ADDIU	A1,A1,AD78	;A1=803CAD78: string 'To '
	SW	A0,002C (SP)	;save p->superscript
	ADDIU	A2,R0,0003	;A2=strlen
	JAL	800998C0
A206002F	SB	A2,002F (S0)	;LW	T6,0050 (SP)
//803CA5C4:	write text to postscript
	ADDIU	A0,S0,009C
3C05803D	-LUI	A1,803D
24A5AD7B	*ADDIU	A1,A1,AD7B	;A1=803CAD7C: p->postscript 'From '
	SW	A0,0028 (SP)
	JAL	800998C0
24060005	-ADDIU	A2,R0,0005	;A2=strlen
//803CA5DC:	write name to postscript
3C058013	+LUI	A1,8013
8CA56FD8	+LW	A1,6FD8 (A1)	;A1=80136FD8: p->player's name
260400A5	*ADDIU	A0,S0,00A5	;A0=strlen of "From " + offset to postscript
	JAL	800998C0
8FA60050	+LW	A2,0050 (SP)	;A2=STRLEN
24010005	ADDIU	AT,R0,0005
	BEQ	R0,R0,803CA6B4
A201002F	SB	AT,002F (S0)	;offset to recipient's name


+-+-+-+
Superscript construction

803C9E98:	+
ADDIU	SP,SP,FF80
SDC1	F20,0040 (SP)
MTC1	A3,F20
SW	RA,0054 (SP)
SW	S2,0050 (SP)
SW	S1,004C (SP)
SW	S0,0048 (SP)
SW	A1,0084 (SP)
LW	T6,002C (A0)	;T6=[803A7680]
LW	T7,0004 (A2)
LUI	S1,0001
ADDIU	AT,R0,0001
ADDU	S1,S1,T6	;S1=[803B7680]: 
BNE	T7,AT,803CA058	;branch if you're editting the superscript right now!
LW	S1,06E4 (S1)	;S1=803CADC0: message data block
LBU	T8,0000 (S1)	;T8=section being editted
LUI	AT,3F80
MTC1	AT,F0	;F0=1.0
BNEZ	T8,803C9EF0
LW	V0,0094 (SP)	;V0=[803CAD40]: pointer to RGBA value
BEQ	R0,R0,803C9EF4
ADDIU	S2,R0,0006	;S2=6 if within superscript name section
//803C9EF0:	write everything before recipient's name
LBU	S2,0003 (S1)	;S2=strlen for recipient's name
LWC1	F4,0090 (SP)	;F4=36.0	y screen offset
ADDIU	S0,S1,002E	;S0=p->block+2E: 01, then place recipient's name occurs in superscript
LBU	A2,0001 (S0)	;A2=location in superscript for recipient's name
SWC1	F4,0010 (SP)	;save y screen offset
LBU	T9,0000 (V0)	;T9=red component
MFC1	A3,F20		;A3=x screen offset
ADDIU	T3,R0,00FF	;T3=alpha component
SW	T9,0014 (SP)	;save red
LBU	T1,0001 (V0)	;T1=green component
ADDIU	A1,S0,0004	;A1=p->block+32: superscript text
LW	A0,0084 (SP)	;A0=[80229050]
SW	T1,0018 (SP)	;save green
LBU	T2,0002 (V0)	;T2=blue component
SW	R0,0034 (SP)	;save 0
SWC1	F0,0030 (SP)	;save 1.0
SWC1	F0,002C (SP)	;save 1.0
SW	R0,0028 (SP)	;save 0
SW	R0,0024 (SP)	;save 0
SW	T3,0020 (SP)	;save alpha
JAL	80090E98	;write text to screen
SW	T2,001C (SP)	;save blue
//803C9F48:
LBU	T4,0001 (S0)	;T4=location in superscript for recipient's name
LUI	AT,3F80
MTC1	AT,F0		;F0=1.0
MTC1	T4,F6		;F6=starting xpos
LW	A0,0084 (SP)	;A0=[80229050]
BGEZ	T4,803C9F74	
CVT.S.W	F8,F6
LUI	AT,4F80
MTC1	AT,F10	;F10=4294967296.0
NOP
ADD.S	F8,F8,F10
//803C9F74:
LUI	AT,4140
MTC1	AT,F16		;F16=12.0	delta x
LWC1	F4,0090 (SP)	;F4=36.0	y screen offset
ADDIU	T5,R0,00B9	;T5=0xB9 (red component)
MUL.S	F18,F8,F16	;F18=initial xpos * 12
ADDIU	T6,R0,00FF	;T6=alpha component
SW	T6,0020 (SP)	;save alpha
SW	T5,0014 (SP)	;save red
ADDIU	A1,S1,0008	;A1=p->block+8: p->recipient's name
OR	A2,S2,R0	;A2=strlen of recipient's name
SW	R0,0018 (SP)	;save green (0)
ADD.S	F20,F20,F18	;F20=xwidth + x screen offset
SW	R0,001C (SP)	;save blue (0)
SW	R0,0024 (SP)	;save 0
SW	R0,0028 (SP)	;save 0
MFC1	A3,F20		;A3=xfinalpos
SWC1	F0,002C (SP)	;save 1.0
SWC1	F0,0030 (SP)	;save 1.0
SW	R0,0034 (SP)	;save 0
JAL	80090E98	;print text to screen
SWC1	F4,0010 (SP)	;save y screen offset
//803C9FC8:
LBU	T0,0001 (S0)	;T0=location in superscript for recipient's name
LUI	AT,3F80
MTC1	AT,F0		;F0=1.0
SLTI	AT,T0,000A	;strlen for superscript can't exceed 10 chars
BEQ	AT,R0,803CA154	;skip this section if there is nothing to write
LW	V0,0094 (SP)	;V0=p->RGBA value
MTC1	S2,F6		;F6=strlen of recipient: start xpos
LWC1	F18,0090 (SP)	;F18=y screen offset
LBU	T7,0005 (S1)	;T7=superscript strlen
CVT.S.W	F10,F6	;F10=[float] start xpos
LUI	AT,4140
MTC1	AT,F8		;F8=12.0	delta x
SWC1	F18,0010 (SP)	;save y screen offset
LBU	T8,0000 (V0)	;T8=red component
ADDU	A1,S0,T0	;A1=803CADEE+start of str following name
MUL.S	F16,F10,F8	;F16=recipient's strlen * 12
SW	T8,0014 (SP)	;save red
LBU	T9,0001 (V0)	;T9=green component
ADDIU	T2,R0,00FF	;T2=alpha component
ADDIU	A1,A1,0004	;A1=p->str
SW	T9,0018 (SP)	;save green
LBU	T1,0002 (V0)	;T1=blue component
ADD.S	F20,F20,F16	;F20=width of initial string + width of recipient's name
SW	R0,0034 (SP)	;save 0
SWC1	F0,0030 (SP)	;save 1.0
SWC1	F0,002C (SP)	;save 1.0
MFC1	A3,F20		;A3=xpos
SW	R0,0028 (SP)	;save 0
SW	R0,0024 (SP)	;save 0
SW	T2,0020 (SP)	;save alpha
LW	A0,0084 (SP)	;A0=[80229050]
SUBU	A2,T7,T0	;A2=strlen: superscript strlen - pos for name
JAL	80090E98	;write that string
SW	T1,001C (SP)	;save blue
BEQ	R0,R0,803CA158	;bail out
LW	RA,0054 (SP)
//		(SET TRIGGER BEFORE ATTEMPTING TO WRITE!)
//803CA058:	Do all this if you're editting the superscript!
//
ADDIU	S0,S1,002E
LBU	V0,0002 (S0)
ADDIU	AT,R0,0002
ADDIU	A1,S0,0004
BEQ	V0,AT,803CA084
ADDIU	A0,SP,0068
ADDIU	AT,R0,0003
BEQ	V0,AT,803CA084
ADDIU	AT,R0,0005
BNEL	V0,AT,803CA098
ADDIU	A0,SP,0068	;A0=target
//803CA084:	set up superscript?
JAL	800998C0	;copy string A1 to A0
ADDIU	A2,R0,000A	;A2=strlen=10
BEQ	R0,R0,803CA0F8
ADDIU	S2,R0,000A
ADDIU	A0,SP,0068
//803CA098:	maybe sets up postscript
ADDIU	A1,S0,0004
JAL	800998C0
LBU	A2,0001 (S0)
LBU	T3,0001 (S0)
ADDIU	T4,SP,0068
ADDIU	A1,S1,0008
LBU	A2,0003 (S1)
JAL	800998C0
ADDU	A0,T3,T4
LBU	T0,0001 (S0)
ADDIU	T7,SP,0068
SLTI	AT,T0,000A
BEQ	AT,R0,803CA0EC
ADDU	A1,S0,T0
LBU	T5,0003 (S1)
LBU	T8,0005 (S1)
ADDIU	A1,A1,0004
ADDU	T6,T5,T0
ADDU	A0,T6,T7
JAL	800998C0
SUBU	A2,T8,T0
//803CA0EC:
LBU	T9,0005 (S1)
LBU	T1,0003 (S1)
ADDU	S2,T9,T1
//803CA0F8:
LWC1	F4,0090 (SP)
LW	V0,0094 (SP)
LUI	AT,3F80
SWC1	F4,0010 (SP)
LBU	T2,0000 (V0)	;T2=red component
MTC1	AT,F0		;F0=1.0
MFC1	A3,F20
SW	T2,0014 (SP)	;save red
LBU	T3,0001 (V0)	;T3=green component
ADDIU	T5,R0,00FF	;T5=alpha component
LW	A0,0084 (SP)	;A0=[80229050]
SW	T3,0018 (SP)	;save green
LBU	T4,0002 (V0)	;T4=blue component
SW	R0,0034 (SP)	;save 0
SW	R0,0028 (SP)	;save 0
SW	R0,0024 (SP)	;save 0
SW	T5,0020 (SP)	;save alpha
ADDIU	A1,SP,0068
OR	A2,S2,R0
SWC1	F0,0030 (SP)	;save 1.0
SWC1	F0,002C (SP)	;save 1.0
JAL	80090E98	;print text to screen
SW	T4,001C (SP)	;save blue
//803CA154:	wrap things up
LW	RA,0054 (SP)
LDC1	F20,0040 (SP)
LW	S0,0048 (SP)
LW	S1,004C (SP)
LW	S2,0050 (SP)
JR	RA
ADDIU	SP,SP,0080

+-+-+-+

This sets the underline and arrow position when switching recipient names
803C98FC:
ADDIU	SP,SP,FFC8
LUI	AT,4180
MTC1	AT,F12		;F12=16.0	delta y
SW	RA,0014 (SP)
SW	A2,0040 (SP)	;save x paning offset
SW	A3,0044 (SP)	;save y panning offset
LW	T6,0000 (A1)
LUI	V0,0001
LUI	AT,4140
SW	T6,0034 (SP)
LW	T7,002C (A0)	;T7=[803A7680]
MTC1	AT,F8		;F8=12.0	delta x
LWC1	F16,0040 (SP)	;F16=x panning offset
ADDU	V0,V0,T7	;V0=[803B7680]
LW	V0,06E4 (V0)	;V0=803CADC0: message data block
LUI	AT,C2C0
MOV.S	F14,F12	;F14=delta y
LBU	T8,002F (V0)	;T8=position of name in postscript
LUI	A2,3F80
OR	A3,R0,R0	;A3=0
ADDIU	T9,T8,0003	;T9=pos+3	x offset for border?
MTC1	T9,F4
NOP
CVT.S.W	F6,F4	;F6=xnum
MTC1	AT,F4		;F4= -96.0
LUI	AT,C298
MUL.S	F10,F6,F8	;F10=xnum * 12.0
ADD.S	F18,F10,F16	;F18=xpos +  panning offset
MTC1	AT,F10		;F10= -76.0
ADD.S	F6,F18,F4	;F6=xpos -96.0
SWC1	F6,00B0 (V0)	;save xfinal
LWC1	F8,0044 (SP)
SUB.S	F16,F8,F10	;F16=?+76
SWC1	F16,00B4 (V0)	;save yfinal
JAL	800E041C
SW	V0,0030 (SP)	;save message data block
//803C998C:

0C000040	line
0C000120	line
0C0001C0	arrow


!REVISED!
803C98FC:	REVISION
	ADDIU	SP,SP,FFC8
	LUI	AT,4180
	MTC1	AT,F12		;F12=16.0	delta y
	SW	RA,0014 (SP)
	SW	A2,0040 (SP)	;save x paning offset
	SW	A3,0044 (SP)	;save y panning offset
	LW	T6,0000 (A1)
	LUI	V0,0001
AFAE0034	SW	T6,0034 (SP)
8C8F002C	LW	T7,002C (A0)	;T7=[803A7680]
C7B00040	LWC1	F16,0040 (SP)	;F16=x panning offset
004F1021	ADDU	V0,V0,T7	;V0=[803B7680]
8C5906E4	*LW	T9,06E4 (V0)	;T9=803CADC0: message data block SAFE!
00000000	*NOP
27240032	*ADDIU	A0,0032 (T9)
0C0240B2	*JAL	800902C8
9325002F	*LBU	A1,002F (T9)	;T8=position of name in postscript
24420024	*ADDIU	V0,V0,0024	;adds that offset of 36 from before
46006386	MOV.S	F14,F12	;F14=delta y
3C063F80	LUI	A2,3F80
00003825	OR	A3,R0,R0	;A3=0
44822000	*MTC1	V0,F4
3C01C2C0	-LUI	AT,C2C0
468021A0	CVT.S.W	F6,F4	;F6=xnum
44812000	-MTC1	AT,F4		;F4= -96.0
3C01C298	LUI	AT,C298
00191025	*OR	V0,R0,T9	;set V0 back to expected
46103480	*ADD.S	F18,F6,F16	;F18=xpos +  panning offset
44815000	MTC1	AT,F10		;F10= -76.0
46049180	ADD.S	F6,F18,F4	;F6=xpos -96.0
	SWC1	F6,00B0 (V0)	;save xfinal
	LWC1	F8,0044 (SP)
	SUB.S	F16,F8,F10	;F16=ypos+76
	SWC1	F16,00B4 (V0)	;save yfinal
	JAL	800E041C
	SW	V0,0030 (SP)	;save message data block

+-+-+-+

Still need to figure out what they're doing with these crazy matrix commands
Theoreticaly it resizes the underline to fit the word, somehow
Oh yeah, the arrow is all screwed up too.	

+-+-+-+

Unrelated, but this handles the [END] block
remember, all [END] block routines are temporary!
they have to be reworked when variable line widths are constructed

803CD77C:	add a character, maybe just within a line
LH	V1,001C (A0)
LH	A2,0016 (A0)
LW	T6,0024 (A0)
OR	A1,V1,R0
SLT	AT,A2,V1
BEQ	AT,R0,803CD7BC
ADDU	V0,T6,V1
LBU	T7,FFFF (V0)
//803CD79C:
ADDIU	A1,A1,FFFF
ADDIU	V0,V0,FFFF
SB	T7,0001 (V0)
LH	A2,0016 (A0)
SLT	AT,A2,A1
BNEL	AT,R0,803CD79C
LBU	T7,FFFF (V0)
LH	V1,001C (A0)
//803CD7BC:
LBU	T0,0013 (A0)
ADDIU	T8,A2,0001	;curpos++
ADDIU	T9,V1,0001	;strlen++
SH	T8,0016 (A0)	;save new curpos
SH	T9,001C (A0)	;save new strlen
ADDIU	T1,R0,0001
SB	T0,0000 (V0)
SB	T1,0015 (A0)	;1->controlblock+0x15
JR	RA
NOP


803CDB4C:	delete a character or update count or something
LH	V0,0016 (A0)	;V0=cursor pos.
ADDIU	T3,R0,0020	;T3= space
ADDIU	T4,R0,0001	;T4=1
BEQ	V0,R0,803CDBB0
ADDIU	T6,V0,FFFF	;T6=curpos--
LH	T7,001C (A0)	;T7=count
SH	T6,0016 (A0)	;save new cursor position
LH	A1,0016 (A0)	;A1=curpos
ADDIU	T8,T7,FFFF
SH	T8,001C (A0)	;save new count
//803CDB74:
LH	T0,001C (A0)	;T0=count
LW	T9,0024 (A0)	;T9=p->text
SLT	AT,A1,T0	;TRUE if curpos < count
BEQ	AT,R0,803CDBA8
ADDU	V1,T9,A1	;V1=p->text+curpos: p->last character
LBU	T1,0001 (V1)
//803CDB8C:
ADDIU	A1,A1,0001
ADDIU	V1,V1,0001
SB	T1,FFFF (V1)
LH	T2,001C (A0)
SLT	AT,A1,T2
BNEL	AT,R0,803CDB8C
LBU	T1,0001 (V1)
//803CDBA8:
SB	T3,0000 (V1)	;save space to removed character
SB	T4,0015 (A0)	;save 1->control bank +0x15
//803CDBB0:
JR	RA
NOP

hits @
803C9CAC	controls [END] spacing
803CA268

803C9C5C:	set the [END] block
ADDIU	SP,SP,FF68
SDC1	F20,0040 (SP)
MTC1	A3,F20
SW	RA,0094 (SP)
SW	S8,0090 (SP)
SW	S7,008C (SP)
SW	S6,0088 (SP)
SW	S5,0084 (SP)
SW	S4,0080 (SP)
SW	S3,007C (SP)
SW	S2,0078 (SP)
SW	S1,0074 (SP)
SW	S0,0070 (SP)
SDC1	F30,0068 (SP)
SDC1	F28,0060 (SP)
SDC1	F26,0058 (SP)
SDC1	F24,0050 (SP)
SDC1	F22,0048 (SP)
SW	A1,009C (SP)
SW	A2,00A0 (SP)
//803C9CAC:
LUI	AT,4140
MTC1	AT,F30		;F30=12.0	delta x
LW	T6,002C (A0)
LUI	AT,4180
MTC1	AT,F28		;F28=16.0	delta y
LUI	V0,0001
LUI	AT,42F0
ADDU	V0,V0,T6
LW	V0,06E4 (V0)
LUI	AT,4320
MTC1	AT,F24
LUI	AT,3F80
MTC1	AT,F22		;F22=1.0
OR	S6,R0,R0
LW	S8,00AC (SP)
LW	S7,00B4 (SP)
LW	S3,00A8 (SP)
ADDIU	S2,R0,00CD
LW	V1,00B0 (SP)
ADDIU	S5,V0,003C
LBU	S1,0006 (V0)
OR	S4,R0,R0
BLEZ	S1,803C9D48
OR	S0,R0,R0
ADDU	V0,S5,R0
LBU	T7,0000 (V0)
//803C9D18:
BNEL	S2,T7,803C9D30
ADDIU	S0,S0,0001
ADDIU	S0,S0,0001
BEQ	R0,R0,803C9D48
ADDIU	S4,R0,0001
-ADDIU	S0,S0,0001
//803C9D30:
SLTI	AT,S0,0010
BEQ	AT,R0,803C9D48
ADDIU	V0,V0,0001
SLT	AT,S0,S1
BNEL	AT,R0,803C9D18
LBU	T7,0000 (V0)
//803C9D48:
BEQL	S0,R0,803C9E3C
LWC1	F4,0000 (S3)
BEQ	S4,R0,803C9D70
LW	T8,009C (SP)
LW	T9,0004 (T8)
ADDIU	AT,R0,0001
BEQL	T9,AT,803C9D74
OR	A2,S0,R0
BEQ	R0,R0,803C9D74
ADDIU	A2,S0,FFFF
-OR	A2,S0,R0
//803C9D74:	set all the variables for a write
BEQL	A2,R0,803C9DD0
SUBU	S1,S1,S0
LWC1	F4,0000 (S3)
MFC1	A3,F20
ADDIU	T3,R0,00FF	;T3=alpha component
SWC1	F4,0010 (SP)
LBU	T0,0000 (S7)	;T0=red component
LW	A0,00A0 (SP)
OR	A1,S5,R0
SW	T0,0014 (SP)	;save red
LBU	T1,0001 (S7)	;T1=green component
SW	T1,0018 (SP)	;save green
LBU	T2,0002 (S7)	;T2=blue component
SW	R0,0034 (SP)	;save 0
SWC1	F22,0030 (SP)	;save 1.0
SWC1	F22,002C (SP)	;save 1.0
SW	R0,0028 (SP)	;save 0
SW	R0,0024 (SP)	;save 0
SW	T3,0020 (SP)	;save alpha
JAL	80090E98	;print text to screen
SW	T2,001C (SP)	;save blue
//803C9DC8:
LW	V1,00B0 (SP)
SUBU	S1,S1,S0
//803C9DD0:
BNEZ	S1,803C9E38
ADDU	S5,S5,S0	;S5=p->end of line (probably)
ADDIU	AT,R0,0005
BEQL	S6,AT,803C9E14
MTC1	S0,F18
BNEZ	S4,803C9DF4
ADDIU	AT,R0,0010
BNEL	S0,AT,803C9E14
MTC1	S0,F18
//803C9DF4:
SUB.S	F6,F20,F24
SWC1	F6,0000 (S8)
LWC1	F8,0000 (S3)
ADD.S	F10,F8,F28
SUB.S	F16,F26,F10
BEQ	R0,R0,803C9E38
SWC1	F16,0000 (V1)
-MTC1	S0,F18		;F18=xnum
//803C9E14:	compute spacing for [END]
NOP
CVT.S.W	F4,F18	;F4=[float]xnum
MUL.S	F6,F4,F30	;F6=xnum*12=xpos
ADD.S	F8,F6,F20
SUB.S	F10,F8,F24
SWC1	F10,0000 (S8)
LWC1	F16,0000 (S3)
SUB.S	F18,F26,F16
SWC1	F18,0000 (V1)
//803C9E38:
LWC1	F4,0000 (S3)
ADDIU	S6,S6,0001
ADDIU	AT,R0,0006
ADD.S	F6,F4,F28
BNE	S6,AT,803C9D04
SWC1	F6,0000 (S3)
//803C9E50:
LW	RA,0094 (SP)
LDC1	F20,0040 (SP)
LDC1	F22,0048 (SP)
LDC1	F24,0050 (SP)
LDC1	F26,0058 (SP)
LDC1	F28,0060 (SP)
LDC1	F30,0068 (SP)
LW	S0,0070 (SP)
LW	S1,0074 (SP)
LW	S2,0078 (SP)
LW	S3,007C (SP)
LW	S4,0080 (SP)
LW	S5,0084 (SP)
LW	S6,0088 (SP)
LW	S7,008C (SP)
LW	S8,0090 (SP)
JR	RA
ADDIU	SP,SP,0098


PATCHITY FIX
(REMEMBER TO REDO ALL WITH WIDTH CORRECTION)
//803C9DD0:
	BNEZ	S1,803C9E38
	ADDU	S5,S5,S0	;S5=p->end of line (probably)
	ADDIU	AT,R0,0005
C6700000	LWC1	F16,0000 (S3)
52C1000B	*BEQL	S6,AT,803C9E10
02B02023	*SUBU	A0,S5,S0
16800003	BNEZ	S4,803C9DF4
24010010	ADDIU	AT,R0,0010
56010007	*BNEL	S0,AT,803C9E10
02B02023	*SUBU	A0,S5,S0
//803C9DF4:
4618A181	SUB.S	F6,F20,F24
E7C60000	SWC1	F6,0000 (S8)
461C8280	*ADD.S	F10,F16,F28
460AD401	SUB.S	F16,F26,F10
1000000B	BEQ	R0,R0,803C9E38
E4700000	SWC1	F16,0000 (V1)
//803C9E10:	compute spacing for [END]
0C0240B2	*JAL	800902C8
00102825	*OR	A1,R0,S0
44829000	*MTC1	V0,F18	;-MTC1	S0,F18		;F18=xnum
46809120	CVT.S.W	F4,F18	;F4=[float]xnum
8FA300B0	*LW	V1,00B0 (SP)
4610D481	SUB.S	F18,F26,F16
46142200	*ADD.S	F8,F4,F20
46184281	SUB.S	F10,F8,F24
E7CA0000	SWC1	F10,0000 (S8)
E4720000	SWC1	F18,0000 (V1)

+-+-+-+-+

Package and mail detail lines:
1	delivery
2	letter
3	
4	
5	
6	recieved letter+gift
7	present	from -	(letter with a gift)
8	fortune
9	letter f/ happy room academy

!=4	gift to *

803C4D8C	tacks the sender/reciever bit onto packages in inventory
ADDIU	SP,SP,FFA0
SW	RA,0044 (SP)
SW	S1,0040 (SP)
SW	S0,003C (SP)
SW	A0,0060 (SP)
SW	A1,0064 (SP)	;SP+64=A1: p->data block
SW	A2,0068 (SP)	;SP+68=A2: [float] xpos
SW	A3,006C (SP)	;SP+6C=A3: [float] ypos
LW	T6,0064 (SP)
ADDIU	AT,R0,0004
LUI	S0,803C
LBU	T7,0002 (T6)
LWC1	F0,0070 (SP)
LWC1	F4,006C (SP)	;F4=ypos
BNE	T7,AT,803C4DE4
ADDIU	T2,R0,00FF	;T2=alpha component
//803C4DCC:	text following reciever
LUI	S0,803C
LUI	V0,803C
ADDIU	S0,S0,5D5A	;S0=803C5D5A: "to"
ADDIU	S1,R0,0002	;S1=strlen of 803C5D5A: 2
BEQ	R0,R0,803C4DF4
ADDIU	V0,V0,6748	;V0=803C6748: p->RGB
//803C4DE4:
LUI	V0,803C
ADDIU	S0,S0,5D58	;S0=803C5D58: "gift to" or something like that
ADDIU	S1,R0,0004
ADDIU	V0,V0,6740	;V0=803C6740: p->RGB
//803C4DF4:	write name 1 as text
SWC1	F4,0010 (SP)	;ypos
LBU	T8,0000 (V0)	;T8=red
LW	A1,0064 (SP)	;A1=SP+64: p->data
LW	A0,0060 (SP)
SW	T8,0014 (SP)	;save red component
LBU	T9,0001 (V0)	;T9=green
ADDIU	A1,A1,0044	;A1+=44: p->recipient's name
ADDIU	A2,R0,0008	;A2=strlen
SW	T9,0018 (SP)	;save green component
LBU	T1,0002 (V0)	;T1=blue
SW	A1,004C (SP)
SW	R0,0034 (SP)
SWC1	F0,0034 (SP)
SWC1	F0,0030 (SP)
SW	R0,0028 (SP)
SW	R0,0024 (SP)
SW	T2,0020 (SP)	;save alpha component
LW	A3,0068 (SP)	;A3=SP+68: xpos
JAL	80090E98	;write text to screen: A0=?, A1=p->source, A2=strlen
SW	T1,001C (SP)	;save blue component
//803C4E44:	kill whitespace after name
LW	A0,004C (SP)
ADDIU	A1,R0,0006
JAL	8009C1C0	;remove trailing characters from name string
ADDIU	A2,R0,0020
//803C4E54:	write "to"
MTC1	V0,F6		;F6=V0	width of previous string
LWC1	F10,0074 (SP)	;F10=SP+74: assumed width of a character
LWC1	F18,0068 (SP)	;F18=base xpos
CVT.S.W	F8,F6	;F8=F6->float
LWC1	F0,0070 (SP)
LWC1	F6,006C (SP)	;F6=ypos
ADDIU	T3,R0,005A
ADDIU	T4,R0,003C
ADDIU	T5,R0,0032
MUL.S	F16,F8,F10	;F16=x offset for previous string
ADDIU	T6,R0,00FF
SW	T6,0020 (SP)
SW	T5,001C (SP)
SW	T4,0018 (SP)
SW	T3,0014 (SP)
LW	A0,0060 (SP)
ADD.S	F4,F16,F18	;F4=final xpos
OR	A1,S0,R0	;A1=S0: A1=p->source
OR	A2,S1,R0	;A2=S1: strlen= 2
SW	R0,0024 (SP)
MFC1	A3,F4		;A3=xpos
SW	R0,0028 (SP)
SW	R0,0034 (SP)
SWC1	F0,002C (SP)
SWC1	F0,0030 (SP)
JAL	80090E98	;print text to screen
SWC1	F6,0010 (SP)	;ypos
//803C4EC0:	determine type of superscript
LW	T7,0064 (SP)	;T7=p->data
LWC1	F2,006C (SP)	;F2=ypos
LWC1	F8,0078 (SP)	;F8=y row offset?
LBU	V1,0002 (T7)
ADDIU	AT,R0,0001
LWC1	F0,0070 (SP)
BNE	V1,AT,803C4EF0
ADD.S	F2,F2,F8	;F2+=row
//803C4EE0:	1=Delivery
LUI	S0,803C
ADDIU	S0,S0,5D4C	;S0=803C5D4C: "Delivery"
BEQ	R0,R0,803C4F10
ADDIU	S1,R0,0006	;S1=strlen of "Delivery"
//803C4EF0:	8=fortune
ADDIU	AT,R0,0008
BNE	V1,AT,803C4F08
ADDIU	S1,R0,0004	;S1=strlen of "Letter"
LUI	S0,803C
BEQ	R0,R0,803C4F10
ADDIU	S0,S0,5D40	;S0=803C5D40: "Fortune"	(written oracle?)
//803C4F08:	else=Letter
LUI	S0,803C
ADDIU	S0,S0,5D54	;S0=803C5D54: "Letter"
//803C4F10:	write delivery type
ADDIU	T8,R0,005A
ADDIU	T9,R0,003C
ADDIU	T1,R0,0032
ADDIU	T2,R0,00FF
SW	T2,0020 (SP)
SW	T1,001C (SP)
SW	T9,0018 (SP)
SW	T8,0014 (SP)
LW	A0,0060 (SP)
OR	A1,S0,R0	;A1=S0: p->source
OR	A2,S1,R0	;A2=S1: strlen
LW	A3,0068 (SP)
SWC1	F2,0010 (SP)	;ypos
SW	R0,0024 (SP)
SW	R0,0028 (SP)
SWC1	F0,002C (SP)
SWC1	F0,0030 (SP)
SW	R0,0034 (SP)
JAL	80090E98	;print text to screen
SWC1	F2,006C (SP)	;save modified row value
//803C4F60:	another line of text
LW	T0,0064 (SP)
LWC1	F0,006C (SP)	;F0=ypos
LWC1	F10,0078 (SP)	;F10=y row offset?
LBU	V1,0002 (T0)
ADDIU	AT,R0,0009
ADDIU	T8,R0,00FF
BNE	V1,AT,803C4FA0
ADD.S	F0,F0,F10	;F0+=row
//803C4F80:	type=9	happy room academy
LUI	S0,803C
LUI	V0,803C
ADDIU	T3,T0,004E
ADDIU	S0,S0,5D44	;S0=803C5D44: "Happy Room"
ADDIU	S1,R0,0007	;S1=strlen of "Happy Room"
SW	T3,0048 (SP)
BEQ	R0,R0,803C5018
ADDIU	V0,V0,6748	;V0=803C6748: RGBA
//803C4FA0:	normal sender names
ADDIU	S0,T0,004C	;S0=T0+4C: p->sender name
ADDIU	AT,R0,0003
SW	S0,0048 (SP)
BNE	V1,AT,803C4FC0
ADDIU	S1,R0,0008	;S1=strlen of name
//803C4FB4:	type=3
LUI	V0,803C
BEQ	R0,R0,803C5018
ADDIU	V0,V0,6748	;V0=803C6748: RGBA
//803C4FC0:	type=8	fortune
ADDIU	AT,R0,0008
BNE	V1,AT,803C4FD4
LUI	V0,803C
BEQ	R0,R0,803C5018
ADDIU	V0,V0,6750	;V0=803C6750: RGBA
//803C4FD4:	type=6
ADDIU	AT,R0,0006
BNE	V1,AT,803C4FE8
LUI	V0,803C
BEQ	R0,R0,803C5018
ADDIU	V0,V0,6750	;V0=803C6750: RGBA
//803C4FE8:	type=5
ADDIU	AT,R0,0005
BNE	V1,AT,803C4FFC
LUI	V0,803C
BEQ	R0,R0,803C5018
ADDIU	V0,V0,674C	;V0=803C674C: RGBA
//803C4FFC:	type=7
ADDIU	AT,R0,0007
BNE	V1,AT,803C5014
LUI	V0,803C
LUI	V0,803C
BEQ	R0,R0,803C5018
ADDIU	V0,V0,6754	;V0=803C6754: RGBA
//803C5014:	else
ADDIU	V0,V0,6744	;V0=803C6744: RGBA
//803C5018:	sender's name?
SWC1	F0,0010 (SP)	;ypos
LBU	T5,0000 (V0)
LWC1	F2,0070 (SP)
LW	A0,0060 (SP)
SW	T5,0014 (SP)
LBU	T6,0001 (V0)
OR	A1,S0,R0
OR	A2,S1,R0
SW	T6,0018 (SP)
LBU	T7,0002 (V0)
SWC1	F0,006C (SP)	;save modified ypos value
SW	R0,0034 (SP)
SW	R0,0028 (SP)
SW	R0,0024 (SP)
SW	T8,0020 (SP)
LW	A3,0068 (SP)
SWC1	F2,0030 (SP)
SWC1	F2,002C (SP)
JAL	80090E98	;print text to screen
SW	T7,001C (SP)
//803C5068:	fry whitespace
LW	A0,0048 (SP)
ADDIU	A1,R0,0006
JAL	8009C1C0
ADDIU	A2,R0,0020
//803C5078:	trailing text after sender
LW	T9,0064 (SP)
ADDIU	AT,R0,0008
OR	T0,V0,R0
LBU	V1,0002 (T9)
BEQ	V1,AT,803C5130	;branch if type=8	fortune
ADDIU	AT,R0,0009
BEQ	V1,AT,803C5130	;branch if type=9	happy room academy
LW	A0,0060 (SP)
ADDIU	AT,R0,0003
BEQ	V1,AT,803C50B0	;branch if type=3	normal letter?
LWC1	F4,0074 (SP)
ADDIU	AT,R0,0007
BNE	V1,AT,803C50C0	;branch if type=7	present from *
LUI	S0,803C
//803C50B0:	from
LUI	S0,803C
ADDIU	S0,S0,5D5E	;S0=803C5D5E: "from"
BEQ	R0,R0,803C50C8
ADDIU	S1,R0,0002	;S1=strlen of "from"
//803C50C0:	present
ADDIU	S0,S0,5D5C	;S0=803C5D5C: "gift from"
ADDIU	S1,0004	;S1=strlen of "gift from"
//803C50C8:
MTC1	T0,F16
LWC1	F8,0068 (SP)
ADDIU	T1,R0,005A
CVT.S.W	F18,F16
LWC1	F16,006C (SP)	;F16=ypos
ADDIU	T2,R0,003C
ADDIU	T3,R0,0032
ADDIU	T4,R0,00FF
SW	T4,0020 (SP)
MUL.S	F6,F18,F4
LWC1	F4,0070 (SP)
LWC1	F18,0070 (SP)
SW	T3,001C (SP)
SW	T2,0018 (SP)
SW	T1,0014 (SP)
OR	A1,S0,R0
ADD.S	F10,F6,F8
OR	A2,S1,R0
SW	R0,0024 (SP)
SW	R0,0028 (SP)
MFC1		A3,F10
SW	R0,0034 (SP)
SWC1	F16,0010 (SP)	;ypos
SWC1	F4,0030 (SP)
JAL	80090E98	;print text to screen
SWC1	F18,002C (SP)
//803C5130:
LW	RA,0044 (SP)
LW	S0,003C (SP)
LW	S1,0040 (SP)
JR	RA
ADDIU	SP,SP,0060



//revision log!
//803C4FA0:	this is a bad move!
ADDIU	S0,T0,004C	->	004E

!_!  !_!  !_!  !_!
//complete rewrite!
803C4D8C	tacks the sender/reciever bit onto packages in inventory
ADDIU	SP,SP,FFA0
SW	RA,0044 (SP)
SW	S1,0040 (SP)
SW	S0,003C (SP)
SW	A0,0060 (SP)
SW	A1,0064 (SP)	;SP+64=A1: p->data block
SW	A2,0068 (SP)	;SP+68=A2: [float] xpos
SW	A3,006C (SP)	;SP+6C=A3: [float] ypos

//PACKAGE TYPE LINE	881C
//803C4EC0:	determine type of superscript
8FAF0064	LW	T7,0064 (SP)	;T7=p->data
C7A4006C	LWC1	F4,006C (SP)	;F2=ypos
C7A80078	LWC1	F8,0078 (SP)	;F8=y row offset?
91E30002	LBU	V1,0002 (T7)
C7A00070	LWC1	F0,0070 (SP)
3C108088	LUI	S0,8088		;default...
24110006	ADDIU	S1,R0,0006	;S1=strlen of "Letter"
24010001	ADDIU	AT,R0,0001
//803C4EE0:	1=Delivery
14610004	BNE	V1,AT,+4
24010008	ADDIU	AT,R0,0008
26108ACC	ADDIU	S0,S0,8ACC	;S0=80885D4C: "Delivery"
10000005	BEQ	R0,R0,+5
24110008	ADDIU	S1,R0,0008	;S1=strlen of "Delivery"
//803Cxxxx:	8=Fortune
54610003	BNEL	V1,AT,+3
26108AD4	ADDIU	S0,S0,8AD4	;S0=80885D54: "Letter"
26108AC0	ADDIU	S0,S0,8AC0	;S0=80885D40: "Fortune"	(written oracle?)
24110007	ADDIU	S1,R0,0007	;S1=strlen of "Fortune"
//803Cxxxx:	advance row
46082080	ADD.S	F2,F4,F8	;F2+=row
E7A2006C	SWC1	F2,006C (SP)	;save modified row value
//803C4F10:	write delivery type
02002825	OR	A1,S0,R0	;A1=S0: p->source
02203025	OR	A2,S1,R0	;A2=S1: strlen
240B005A	ADDIU	T3,R0,005A	;T8=red
240C003C	ADDIU	T4,R0,003C	;T9=green
240D0032	ADDIU	T5,R0,0032	;T1=blue
240E00FF	ADDIU	T6,R0,00FF	;T2=alpha component
8FA70068	LW	A3,0068 (SP)
AFA00034	SW	R0,0034 (SP)
E7A00030	SWC1	F0,0030 (SP)
E7A0002C	SWC1	F0,002C (SP)
AFA00028	SW	R0,0028 (SP)
AFA00024	SW	R0,0024 (SP)
AFAE0020	SW	T6,0020 (SP)	;save alpha component
AFAD001C	SW	T5,001C (SP)	;save blue component
AFAC0018	SW	T4,0018 (SP)	;save green component
AFAB0014	SW	T3,0014 (SP)	;save red component
8FA40060	LW	A0,0060 (SP)
0C0243A6	JAL	80090E98	;print text to screen
E7A40010	SWC1	F4,0010 (SP)	;ypos
	
//803C4DAC:	RECIPIENT LINE
//here hacked so that no switching occurs.  In English, a package is always presumed from the sender
//plus, I can't quite fit the text as of yet.  Still, we can get both types on the Item type line
//only change is in the color highlight of the recipient
//regardless the type, there is always a recipient
8FAF0064	LW	T7,0064 (SP)
24010004	ADDIU	AT,R0,0004
3C108088	LUI	S0,8088
91E30002	LBU	V1,0002 (T7)
C7A00070	LWC1	F0,0070 (SP)
C7A4006C	LWC1	F4,006C (SP)	;F4=ypos
261194C8	ADDIU	S1,S0,94C8	;V0=80886748: p->RGB
14610001	BNEL	V1,AT,+1	;if T7!=4, use 'gift to' line
261194C0	ADDIU	S1,S0,94C0	;V0=80886740: p->RGB
//803C4DCC:	text following reciever
26058ADA	ADDIU	A1,S0,8ADA	;S0=80885D5A: "to"
24060002	ADDIU	A2,R0,0002	;S1=strlen of 80885D5A: 2
//803C4DF4:	write name 1 as text
240B005A	ADDIU	T3,R0,005A	;T8=red
240C003C	ADDIU	T4,R0,003C	;T9=green
240D0032	ADDIU	T5,R0,0032	;T1=blue
240E00FF	ADDIU	T6,R0,00FF	;T2=alpha component
8FA70068	LW	A3,0068 (SP)	;A3=SP+68: xpos
8FB00064	LW	S0,0064 (SP)	;A1=SP+64: p->data
26100044	ADDIU	S0,S0,0044	;A1+=44: p->recipient's name
AFA5004C	SW	A1,004C (SP)
AFA00034	SW	R0,0034 (SP)
E7A00030	SWC1	F0,0030 (SP)
E7A0002C	SWC1	F0,002C (SP)
AFA00028	SW	R0,0028 (SP)
AFA00024	SW	R0,0024 (SP)
AFAE0020	SW	T6,0020 (SP)	;save alpha component
AFAD001C	SW	T5,001C (SP)	;save blue component
AFAC0018	SW	T4,0018 (SP)	;save green component
AFAB0014	SW	T3,0014 (SP)	;save red component
8FA40060	LW	A0,0060 (SP)
0C0243A6	JAL	80090E98	;write text to screen: A0=?, A1=p->source, A2=strlen
E7A40010	SWC1	F4,0010 (SP)	;ypos
//803C4E44:	kill whitespace after name
8FA4004C	LW	A0,004C (SP)
24050002	ADDIU	A1,R0,0002
//Try converting to pels instead...
0C0240B3	JAL	800902CC	;returns V0=width in thingies
24060000	ADDIU	A2,R0,0000
//original jump
//0C027070	JAL	8009C1C0	;remove trailing characters from name string
//24060020	ADDIU	A2,R0,0020
//803C4E54:	write "to"
44823000	MTC1	V0,F6		;F6=V0	width of previous string
//omit if using pels	C7AA0074	LWC1	F10,0074 (SP)	;F10=SP+74: assumed width of a character
C7B20068	LWC1	F18,0068 (SP)	;F18=base xpos
//convert for pels
46803420	CVT.S.W	F16,F6	;F16=F6->float
//original convert	46803220	CVT.S.W	F8,F6	;F8=F6->float
C7A00070	LWC1	F0,0070 (SP)
C7A4006C	LWC1	F4,006C (SP)	;F4=ypos
922B0000	LBU	T3,0000 (S1)
922C0001	LBU	T4,0001 (S1)
922D0002	LBU	T5,0002 (S1)
922E0003	LBU	T6,0003 (S1)
//omit if using pels	460A4402	MUL.S	F16,F8,F10	;F16=x offset for previous string
02002825	OR	A1,S0,R0	;A1=S0: A1=p->source
24060008	ADDIU	A2,R0,0008	;A2=S1: strlen= 2
//org nonpel	46128100	ADD.S	F4,F16,F18	;F4=final xpos
46128180	ADD.S	F6,F16,F18
//ORG NONPEL	44072000	MFC1	A3,F4		;A3=xpos
44073000	MFC1	A3,F6		;A3=xpos
AFA00034	SW	R0,0034 (SP)
E7A00030	SWC1	F0,0030 (SP)
E7A0002C	SWC1	F0,002C (SP)
AFA00028	SW	R0,0028 (SP)
AFA00024	SW	R0,0024 (SP)
AFAE0020	SW	T6,0020 (SP)	;save alpha component
AFAD001C	SW	T5,001C (SP)	;save blue component
AFAC0018	SW	T4,0018 (SP)	;save green component
AFAB0014	SW	T3,0014 (SP)	;save red component
8FA40060	LW	A0,0060 (SP)
0C0243A6	JAL	80090E98	;write text to screen: A0=?, A1=p->source, A2=strlen
E7A40010	SWC1	F4,0010 (SP)	;ypos	

//SENDER LINE
//803C5078:	FROM
44803000	MTC1	R0,F6		;F6=V0	width of previous string
C7A4006C	LWC1	F4,006C (SP)	;F2=ypos
C7A80078	LWC1	F8,0078 (SP)	;F10=y row offset?
46082100	ADD.S	F4,F4,F8	;F0+=row
8FAF0064	LW	T7,0064 (SP)
91E30002	LBU	V1,0002 (T7)
E7A4006C	SWC1	F4,006C (SP)	;save modified ypos value
24010008	ADDIU	AT,R0,0008
1061001D	BEQ	V1,AT,80884F60	;branch if type=fortune
24010009	ADDIU	AT,R0,0009
1061001B	BEQ	V1,AT,80884F60	;branch if type=happy room academy
C7A00070	LWC1	F0,0070 (SP)
//803C50C8:
3C058088	LUI	A1,8088
24A58ADC	ADDIU	A1,A1,8ADC	;S0=80885D5E: "from"
AFA50048	SW	A1,0048 (SP)
24060004	ADDIU	A2,R0,0004	;S1=strlen of "from"
240B005A	ADDIU	T3,R0,005A	;T8=red
240C003C	ADDIU	T4,R0,003C	;T9=green
240D0032	ADDIU	T5,R0,0032	;T1=blue
240E00FF	ADDIU	T6,R0,00FF	;T2=alpha component
8FA70068	LW	A3,0068 (SP)
AFA00034	SW	R0,0034 (SP)
E7A00030	SWC1	F0,0030 (SP)
E7A0002C	SWC1	F0,002C (SP)
AFA00028	SW	R0,0028 (SP)
AFA00024	SW	R0,0024 (SP)
AFAE0020	SW	T6,0020 (SP)	;save alpha component
AFAD001C	SW	T5,001C (SP)	;save blue component
AFAC0018	SW	T4,0018 (SP)	;save green component
AFAB0014	SW	T3,0014 (SP)	;save red component
8FA40060	LW	A0,0060 (SP)
0C0243A6	JAL	80090E98	;print text to screen
E7A40010	SWC1	F4,0010 (SP)	;ypos
//803C5068:	fry whitespace - set spacing
8FA40048	LW	A0,0048 (SP)
24050004	ADDIU	A1,R0,0004
0C0240B3	JAL	800902CC	;returns V0=width in thingies
24060000	ADDIU	A2,R0,0000
44823000	MTC1	V0,F6		;F6=V0	width of previous string
//803C4F60:	NAME OF SENDER
C7B20068	LWC1	F18,0068 (SP)	;F18=base xpos
46803420	CVT.S.W	F16,F6	;F16=F6->float
8FAF0064	LW	T7,0064 (SP)
91E30002	LBU	V1,0002 (T7)
3C108088	LUI	S0,8088
25E5004C	ADDIU	A1,T7,004C	;default string=name
24060008	ADDIU	A2,R0,0008	;default strlen=8
261194C4	ADDIU	S1,S0,94C4	;V0=80886744: RGBA
24010009	ADDIU	AT,R0,0009
14610004	BNE	V1,AT,+4
24010003	ADDIU	AT,R0,0003
//803C4F80:	type=9	happy room academy
26058AC7	ADDIU	A1,S0,8AC7	;S0=80885D44: "Happy Room"
24060005	ADDIU	A2,R0,0005	;S1=strlen of "Happy Room"
261194C8	ADDIU	S1,S0,94C8	;V0=80886748: RGBA
//803C4FA0:	normal sender names
14610002	BNE	V1,AT,+2
24010008	ADDIU	AT,R0,0008
//803C4FB4:	type=3
261194C8	ADDIU	S1,S0,94C8	;V0=80886748: RGBA
//803C4FC0:	type=8	fortune
14610002	BNE	V1,AT,+2
24010006	ADDIU	AT,R0,0006
261194D0	ADDIU	S1,S0,94D0	;V0=80886750: RGBA
//803C4FD4:	type=6
14610002	BNE	V1,AT,+2
24010005	ADDIU	AT,R0,0005
261194D0	ADDIU	S1,S0,94D0	;V0=80886750: RGBA
//803C4FE8:	type=5
14610002	BNE	V1,AT,+2
24010007	ADDIU	AT,R0,0007
261194CC	ADDIU	S1,S0,94CC	;V0=8088674C: RGBA
//803C4FFC:	type=7
50610001	BEQL	V1,AT,+1
261194D4	ADDIU	S1,S0,94D4	;V0=80886754: RGBA
//803C5018:	sender's name?
C7A00070	LWC1	F0,0070 (SP)
C7A4006C	LWC1	F4,006C (SP)	;F0=ypos
922B0000	LBU	T3,0000 (S1)
922C0001	LBU	T4,0001 (S1)
922D0002	LBU	T5,0002 (S1)
922E0003	LBU	T6,0003 (S1)
46128180	ADD.S	F6,F16,F18
44073000	MFC1	A3,F6		;A3=xpos
AFA00034	SW	R0,0034 (SP)
E7A00030	SWC1	F0,0030 (SP)
E7A0002C	SWC1	F0,002C (SP)
AFA00028	SW	R0,0028 (SP)
AFA00024	SW	R0,0024 (SP)
AFAE0020	SW	T6,0020 (SP)	;save alpha component
AFAD001C	SW	T5,001C (SP)	;save blue component
AFAC0018	SW	T4,0018 (SP)	;save green component
AFAB0014	SW	T3,0014 (SP)	;save red component
8FA40060	LW	A0,0060 (SP)
0C0243A6	JAL	80090E98	;print text to screen
E7A40010	SWC1	F4,0010 (SP)	;ypos

//TERMINATE
//803C5130:
8FBF0044	LW	RA,0044 (SP)
8FB0003C	LW	S0,003C (SP)
8FB10040	LW	S1,0040 (SP)
03E00008	JR	RA
27BD0060	ADDIU	SP,SP,0060

+-+-+-+

now to fit balloons to text:
this is done at +454 - 600:
used by:
803C9668
803C9710
803C97C0
803C9860
803C99B8
803C9C58

C-710680+454 - 600	(803C8C64)	size and display text balloon
	accepts: A0=p->text control block, A1=0,1,2, A2=strlen, A3=0(row?)
3C0F8088	LUI	T7,803D
25EF907C	ADDIU	T7,T7,257C	;T7=803D257C: set of 16 floats	+9D6C
00057180	SLL	T6,A1,0x6	;T6=entry*0x40
01CF1021	ADDU	V0,T6,T7	;V0=803D257C+offset: p->one of three sets of 16 floats
8C580014	LW	T8,0014 (V0)	;T8=2,4,3 as A1=0,1,2, respectively
8C480018	LW	T0,0018 (V0)	;T0=8,6,4 as A1=0,1,2, respectively
24E9FFFE	ADDIU	T1,A3,FFFE	;T1=A3-2: 
00D8C823	SUBU	T9,A2,T8	;T9=strlen-T8: 
44992000	MTC1	T9,F4
44884000	MTC1	T0,F8
00403025	OR	A2,V0,R0	;A2=p->floats
468021A0	CVT.S.W	F6,F4	;F6=[float] strlen-T8
00802825	OR	A1,A0,R0	;A1=A0: p->control block
00001825	OR	V1,R0,R0	;V1=0
468042A0	CVT.S.W	F10,F8	;F10=T0
460A3483	DIV.S	F18,F6,F10	;F18=(strlen-T8)/T0: percentage of possible strlen used
10E00008	BEQ	A3,R0,803C8CC8	;branch if A3=0
E4920004	SWC1	F18,0004 (A0)	;save % -> control+4
44892000	MTC1	T1,F4
3C014040	LUI	AT,4040
44813000	MTC1	AT,F6
46802220	CVT.S.W	F8,F4
46064283	DIV.S	F10,F8,F6
10000003	BEQ	R0,R0,803C8CD0
E48A0008	SWC1	F10,0008 (A0)
//803C8CC8:
C4920004	LWC1	F18,0004 (A0)	;F18=%
E4920008	SWC1	F18,0008 (A0)	;save value to control+8
//803C8CD0:
3C013F80	LUI	AT,3F80
44818000	MTC1	AT,F16		;F16=1.0
24070002	ADDIU	A3,R0,0002	;A3=2
C4CC0000	LWC1	F12,0000 (A2)	;F12=0.340909, 0.8125
C4B20004	LWC1	F18,0004 (A1)	;F18=%
24630001	ADDIU	V1,V1,0001	;V1++
460C8101	SUB.S	F4,F16,F12	;F4=1-value
46049382	MUL.S	F14,F18,F4	;F14=%*(1-value)
50670023	BEQL	V1,A3,803C8D80
460C7280	ADD.S	F10,F14,F12	;F10=%*(1-value)+value
460C7280	ADD.S	F10,F14,F12
//803C8CFC:
24630001	ADDIU	V1,V1,0001	;V1++
24A50004	ADDIU	A1,A1,0004	;A1+=4: p->next value in control block
24C60004	ADDIU	A2,A2,0004	;A2+=4: p->next float
E4AA0010	SWC1	F10,0010 (A1)
C44A0010	LWC1	F10,0010 (V0)
C4A80010	LWC1	F8,0010 (A1)
460A8181	SUB.S	F6,F16,F10
46069182	MUL.S	F6,F18,F6
460A3280	ADD.S	F10,F6,F10
E4AA0018	SWC1	F10,0018 (A1)
C4CA0020	LWC1	F10,0020 (A2)
C4C60018	LWC1	F6,0018 (A2)
C4C40004	LWC1	F4,0004 (A2)
46125282	MUL.S	F10,F10,F18
460A3280	ADD.S	F10,F6,F10
46044102	MUL.S	F4,F8,F4
460A2280	ADD.S	F10,F4,F10
E4AA0028	SWC1	F10,0028 (A1)
C4CA0028	LWC1	F10,0028 (A2)
C4C40004	LWC1	F4,0004 (A2)
C4C60030	LWC1	F6,0030 (A2)
46125282	MUL.S	F10,F10,F18
C4B20004	LWC1	F18,0004 (A1)
46044102	MUL.S	F4,F8,F4
460A3280	ADD.S	F10,F6,F10
46045101	SUB.S	F4,F10,F4
E4A40020	SWC1	F4,0020 (A1)
C4CC0000	LWC1	F12,0000 (A2)
460C8101	SUB.S	F4,F16,F12
46049382	MUL.S	F14,F18,F4
5467FFE1	BNEL	V1,A3,803C8CFC	;this probably only catches on multiline items
460C7280	ADD.S	F10,F14,F12
460C7280	ADD.S	F10,F14,F12
//803C8D80:
24C60004	ADDIU	A2,A2,0004
24A50004	ADDIU	A1,A1,0004
E4AA0010	SWC1	F10,0010 (A1)
C44A0010	LWC1	F10,0010 (V0)
C4A80010	LWC1	F8,0010 (A1)
460A8181	SUB.S	F6,F16,F10
46069182	MUL.S	F6,F18,F6
460A3280	ADD.S	F10,F6,F10
E4AA0018	SWC1	F10,0018 (A1)
C4CA0020	LWC1	F10,0020 (A2)
C4C40004	LWC1	F4,0004 (A2)
C4C60018	LWC1	F6,0018 (A2)
46125282	MUL.S	F10,F10,F18
460A3280	ADD.S	F10,F6,F10
46044102	MUL.S	F4,F8,F4
460A2280	ADD.S	F10,F4,F10
E4AA0028	SWC1	F10,0028 (A1)
C4CA0028	LWC1	F10,0028 (A2)
C4C40004	LWC1	F4,0004 (A2)
C4C60030	LWC1	F6,0030 (A2)
46125282	MUL.S	F10,F10,F18
460A3280	ADD.S	F10,F6,F10
46044102	MUL.S	F4,F8,F4
46045101	SUB.S	F4,F10,F4
E4A40020	SWC1	F4,0020 (A1)
3C013F00	LUI	AT,3F00
44814000	MTC1	AT,F8
C4860020	LWC1	F6,0020 (A0)
C444003C	LWC1	F4,003C (V0)
46083482	MUL.S	F18,F6,F8
C4860028	LWC1	F6,0028 (A0)
46049282	MUL.S	F10,F18,F4
460A3200	ADD.S	F8,F6,F10
E4880028	SWC1	F8,0028 (A0)
03E00008	JR	RA
00000000	NOP

This is only a guess, but chances are this segment will need to be rewritten from the ground up
It assumes that the string has a known maximum number of values and that the width are constant
Instead, should pull actual strwidth, then use that for balloon sizing
Once balloon size is known, offsetting the string can be accomplished
